home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume23 / flex2.3 / part10 < prev    next >
Encoding:
Internet Message Format  |  1990-10-10  |  15.1 KB

  1. Subject:  v23i046:  Flex, a fast lex replacement, Part10/10
  2. Newsgroups: comp.sources.unix
  3. Approved: rsalz@uunet.UU.NET
  4. X-Checksum-Snefru: d2b6e95f dc921fa1 a0ff4705 457779f4
  5.  
  6. Submitted-by: Vern Paxson <vern@cs.cornell.edu>
  7. Posting-number: Volume 23, Issue 46
  8. Archive-name: flex2.3/part10
  9.  
  10. #! /bin/sh
  11. # This is a shell archive.  Remove anything before this line, then feed it
  12. # into a shell via "sh file" or similar.  To overwrite existing files,
  13. # type "sh file -c".
  14. # The tool that generated this appeared in the comp.sources.unix newsgroup;
  15. # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
  16. # Contents:  MISC/Makefile.VMS Makefile ccl.c
  17. # Wrapped by rsalz@litchi.bbn.com on Wed Oct 10 13:24:06 1990
  18. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  19. echo If this archive is complete, you will see the following message:
  20. echo '          "shar: End of archive 10 (of 10)."'
  21. if test -f 'MISC/Makefile.VMS' -a "${1}" != "-c" ; then 
  22.   echo shar: Will not clobber existing file \"'MISC/Makefile.VMS'\"
  23. else
  24.   echo shar: Extracting \"'MISC/Makefile.VMS'\" \(3537 characters\)
  25.   sed "s/^X//" >'MISC/Makefile.VMS' <<'END_OF_FILE'
  26. X############################ VMS MAKEFILE ##############################
  27. X#IMPORTANT:  Before you use this makefile fill in the contents of GNULIB.
  28. X#
  29. X# Define tools$$exe, tools$$library, and tools$$manual to reflect the 
  30. X# locations where you would like to store the executables, library (flex.skel)
  31. X# and the manual pages.  These names can be defined at the command line
  32. X# prompt:  eg.
  33. X#    $ define tools$$exe disk:[dir1.dir2.etc]
  34. X#   
  35. X# Once these names have been defined the following commands
  36. X# can be executed at the command line:
  37. X#
  38. X#   $ mms install
  39. X#   $ mms test
  40. X#   $ mms clean
  41. X#
  42. X# When "mms test" is executed the diff should not show any differences. In fact
  43. X# the same effect can be achieved by
  44. X#
  45. X#   $ mms install, test, clean
  46. X#
  47. X#  The filename of the the mms description file, i.e., this file,
  48. X#  should either be "makefile." or "decrip.mms"
  49. X#
  50. X# VMS make file for "flex" tool
  51. X
  52. X# Redefine the following for your own environment
  53. XBIN = tools$$exe
  54. XLIB = tools$$library
  55. XMAN = tools$$manual
  56. XGNULIB = <******directory where you keep alloca.obj and bcopy.obj***>
  57. X
  58. XSKELETON_FILE = "DEFAULT_SKELETON_FILE=""$(LIB):FLEX.SKEL"""
  59. X
  60. XCCFLAGS = VMS,USG
  61. XFLEX_FLAGS = -is
  62. X
  63. XFLEXOBJS = ccl.obj dfa.obj ecs.obj gen.obj main.obj misc.obj nfa.obj  -
  64. X           parse.obj scan.obj sym.obj tblcmp.obj yylex.obj 
  65. X
  66. XOBJ = ccl.obj,dfa.obj,ecs.obj,gen.obj,main.obj,misc.obj,nfa.obj,parse.obj, -
  67. X      scan.obj,sym.obj,tblcmp.obj,yylex.obj
  68. X
  69. Xdefault : flex
  70. X    ! installed FLEX
  71. X
  72. Xinstall : lib man bin 
  73. X    !Installed FLEX and LIBRARIES
  74. X
  75. Xlib : $(LIB):flex.skel
  76. X    ! Installed $(LIB):flex.skel
  77. X
  78. Xbin : $(BIN):flex.exe
  79. X    flex :== $ $(BIN):flex.exe
  80. X
  81. Xman : $(MAN):flex.doc
  82. X    ! installed $(MAN):flex.doc
  83. X
  84. X$(LIB):flex.skel : flex.skel
  85. X    copy flex.skel $(LIB):flex.skel
  86. X$(BIN):flex.exe : flex.exe
  87. X    copy flex.exe $(BIN):flex.exe
  88. X$(MAN):flex.doc : flex.1
  89. X    copy flex.1 $(MAN):flex.doc
  90. X
  91. Xflex : flex.exe
  92. X    copy flex.exe $(BIN):flex.exe
  93. X
  94. Xflex.exe : $(FLEXOBJS)
  95. X    link /exe=flex.exe -
  96. X        $(OBJ),  -
  97. X        $(GNULIB)alloca.obj,  -
  98. X        $(GNULIB)bcopy.obj
  99. X
  100. X
  101. Xparse.c : parse.y
  102. X    bison/defines/verbose/fixed_outfiles parse.y
  103. X    copy y_tab.c parse.c
  104. X    del/noconfirm y_tab.c;*
  105. X
  106. Xparse.h : parse.c
  107. X    copy y_tab.h parse.h
  108. X    del/noconfirm y_tab.h;*
  109. X
  110. Xscan.c : initscan.c
  111. X    copy initscan.c scan.c
  112. X
  113. Xccl.obj : ccl.c flexdef.h
  114. X    cc /define=($(CCFLAGS)) ccl.c
  115. Xdfa.obj : dfa.c flexdef.h
  116. X    cc /define=($(CCFLAGS)) dfa.c
  117. Xecs.obj : ecs.c flexdef.h
  118. X    cc /define=($(CCFLAGS)) ecs.c
  119. Xgen.obj : gen.c flexdef.h
  120. X    cc /define=($(CCFLAGS)) gen.c
  121. Xmain.obj : main.c flexdef.h
  122. X    cc /define=($(CCFLAGS),$(SKELETON_FILE)) main.c
  123. Xmisc.obj : misc.c flexdef.h
  124. X    cc /define=($(CCFLAGS)) misc.c
  125. Xnfa.obj : nfa.c flexdef.h
  126. X    cc /define=($(CCFLAGS)) nfa.c
  127. Xparse.obj : parse.c flexdef.h parse.h
  128. X    cc /define=($(CCFLAGS)) parse.c
  129. Xscan.obj : scan.c parse.h flexdef.h
  130. X    cc /define=($(CCFLAGS)) scan.c
  131. Xsym.obj : sym.c flexdef.h
  132. X    cc /define=($(CCFLAGS)) sym.c
  133. Xtblcmp.obj : tblcmp.c flexdef.h
  134. X    cc /define=($(CCFLAGS)) tblcmp.c
  135. Xyylex.obj : yylex.c parse.h flexdef.h
  136. X    cc /define=($(CCFLAGS)) yylex.c
  137. X
  138. Xclean :
  139. X    ! Cleaning up by deleting unnecessary object files etc.
  140. X    - delete/noconfirm scan.c;*
  141. X    - delete/noconfirm parse.c;*
  142. X    - delete/noconfirm parse.h;*
  143. X    - delete/noconfirm lexyy.c;*
  144. X    - delete/noconfirm *.obj;*
  145. X    - delete/noconfirm flex*.tmp;*
  146. X    - delete/noconfirm y.output;*
  147. X    - delete/noconfirm *.diff;*
  148. X    - delete/noconfirm y_tab.*;*
  149. X    - purge/log
  150. X
  151. Xtest :  $(BIN):flex.exe
  152. X    flex :== $ $(BIN):flex.exe
  153. X    define tools$$library 'f$environment("default")'
  154. X    sho log tool$$library
  155. X    flex $(FLEX_FLAGS) scan.l
  156. X    diff/out=flex.diff initscan.c lexyy.c
  157. X    type/page flex.diff
  158. END_OF_FILE
  159.   if test 3537 -ne `wc -c <'MISC/Makefile.VMS'`; then
  160.     echo shar: \"'MISC/Makefile.VMS'\" unpacked with wrong size!
  161.   fi
  162.   # end of 'MISC/Makefile.VMS'
  163. fi
  164. if test -f 'Makefile' -a "${1}" != "-c" ; then 
  165.   echo shar: Will not clobber existing file \"'Makefile'\"
  166. else
  167.   echo shar: Extracting \"'Makefile'\" \(4876 characters\)
  168.   sed "s/^X//" >'Makefile' <<'END_OF_FILE'
  169. X# make file for "flex" tool
  170. X
  171. X# @(#) $Header: /usr/fsys/odin/a/vern/flex/RCS/Makefile,v 2.9 90/05/26 17:28:44 vern Exp $ (LBL)
  172. X
  173. X# Porting considerations:
  174. X#
  175. X#    For System V Unix machines, add -DUSG to CFLAGS (if it's not
  176. X#         automatically defined)
  177. X#    For Vax/VMS, add "-DVMS -DUSG" to CFLAGS.
  178. X#    For MS-DOS, add "-DMS_DOS -DUSG" to CFLAGS.  Create \tmp if not present.
  179. X#         You will also want to rename flex.skel to something with a three
  180. X#         character extension, change SKELETON_FILE below appropriately,
  181. X#      See MSDOS.notes for more info.
  182. X#    For Amiga, add "-DAMIGA -DUSG" to CFLAGS.
  183. X#    For SCO Unix, add "-DSCO_UNIX" to CFLAGS.
  184. X#
  185. X#    For C compilers which don't know about "void", add -Dvoid=int to CFLAGS.
  186. X#
  187. X#    If your C compiler is ANSI standard but does not include the <stdlib.h>
  188. X#    header file (some installations of gcc have this problem), then add
  189. X#    -DDONT_HAVE_STDLIB_H to CFLAGS.
  190. X#
  191. X# By default, flex will be configured to generate 8-bit scanners only
  192. X# if the -8 flag is given.  If you want it to always generate 8-bit
  193. X# scanners, add "-DDEFAULT_CSIZE=256" to CFLAGS.  Note that doing
  194. X# so will double the size of all uncompressed scanners.
  195. X# 
  196. X# If on your system you have trouble building flex due to 8-bit
  197. X# character problems, remove the -8 from FLEX_FLAGS and the
  198. X# "#define FLEX_8_BIT_CHARS" from the beginning of flexdef.h.
  199. X
  200. X
  201. X# the first time around use "make first_flex"
  202. X
  203. X
  204. X# Installation targeting.  Files will be installed under the tree rooted
  205. X# at DESTDIR.  User commands will be installed in BINDIR, library files
  206. X# in LIBDIR (which will be created if necessary), auxiliary files in
  207. X# AUXDIR, manual pages will be installed in MANDIR with extension MANEXT.
  208. X# Raw, unformatted troff source will be installed if INSTALLMAN=man, nroff
  209. X# preformatted versions will be installed if INSTALLMAN=cat.
  210. XDESTDIR =
  211. XBINDIR = /usr/local
  212. XLIBDIR = /usr/local/lib
  213. XAUXDIR = /usr/local/lib
  214. XMANDIR = /usr/man/manl
  215. XMANEXT = l
  216. XINSTALLMAN = man
  217. X
  218. X# MAKE = make
  219. X
  220. X
  221. XSKELETON_FILE = $(DESTDIR)$(AUXDIR)/flex.skel
  222. XSKELFLAGS = -DDEFAULT_SKELETON_FILE=\"$(SKELETON_FILE)\"
  223. XCFLAGS = -O
  224. XLDFLAGS = -s
  225. X
  226. XCOMPRESSION =
  227. XFLEX_FLAGS = -ist8 -Sflex.skel
  228. X# which "flex" to use to generate scan.c from scan.l
  229. XFLEX = ./flex
  230. X# CC = cc
  231. X
  232. XAR = ar
  233. XRANLIB = ranlib
  234. X
  235. XFLEXOBJS = \
  236. X    ccl.o \
  237. X    dfa.o \
  238. X    ecs.o \
  239. X    gen.o \
  240. X    main.o \
  241. X    misc.o \
  242. X    nfa.o \
  243. X    parse.o \
  244. X    scan.o \
  245. X    sym.o \
  246. X    tblcmp.o \
  247. X    yylex.o
  248. X
  249. XFLEX_C_SOURCES = \
  250. X    ccl.c \
  251. X    dfa.c \
  252. X    ecs.c \
  253. X    gen.c \
  254. X    main.c \
  255. X    misc.c \
  256. X    nfa.c \
  257. X    parse.c \
  258. X    scan.c \
  259. X    sym.c \
  260. X    tblcmp.c \
  261. X    yylex.c
  262. X
  263. XFLEX_LIB_OBJS = \
  264. X    libmain.o
  265. X
  266. XFLEXLIB = flexlib.a
  267. X
  268. X
  269. Xall : flex $(FLEXLIB)
  270. X
  271. Xflex : $(FLEXOBJS)
  272. X    $(CC) $(CFLAGS) -o flex $(LDFLAGS) $(FLEXOBJS)
  273. X
  274. Xfirst_flex:
  275. X    cp initscan.c scan.c
  276. X    $(MAKE) $(MFLAGS) flex
  277. X
  278. Xparse.h parse.c : parse.y
  279. X    $(YACC) -d parse.y
  280. X    @mv y.tab.c parse.c
  281. X    @mv y.tab.h parse.h
  282. X
  283. Xscan.c : scan.l
  284. X    $(FLEX) $(FLEX_FLAGS) $(COMPRESSION) scan.l >scan.c
  285. X
  286. Xscan.o : scan.c parse.h flexdef.h
  287. X
  288. Xmain.o : main.c flexdef.h
  289. X    $(CC) $(CFLAGS) -c $(SKELFLAGS) main.c
  290. X
  291. Xccl.o : ccl.c flexdef.h
  292. Xdfa.o : dfa.c flexdef.h
  293. Xecs.o : ecs.c flexdef.h
  294. Xgen.o : gen.c flexdef.h
  295. Xmisc.o : misc.c flexdef.h
  296. Xnfa.o : nfa.c flexdef.h
  297. Xparse.o : parse.c flexdef.h
  298. Xsym.o : sym.c flexdef.h
  299. Xtblcmp.o : tblcmp.c flexdef.h
  300. Xyylex.o : yylex.c flexdef.h
  301. X
  302. Xflex.man : flex.1
  303. X    nroff -man flex.1 >flex.man
  304. X
  305. X$(FLEXLIB) : $(FLEX_LIB_OBJS)
  306. X    $(AR) cru $(FLEXLIB) $(FLEX_LIB_OBJS)
  307. X
  308. Xlint : $(FLEX_C_SOURCES)
  309. X    lint $(FLEX_C_SOURCES) > flex.lint
  310. X
  311. Xdistrib :
  312. X    mv scan.c initscan.c
  313. X    chmod 444 initscan.c
  314. X    $(MAKE) $(MFLAGS) clean
  315. X
  316. Xinstall: flex $(DESTDIR)$(LIBDIR) flex.skel install.$(INSTALLMAN) install-lib
  317. X    install -s -m 755 flex $(DESTDIR)$(BINDIR)/flex
  318. X    install -c -m 644 flex.skel $(SKELETON_FILE)
  319. X
  320. Xinstall-lib: $(DESTDIR)$(LIBDIR) $(FLEXLIB)
  321. X    install -c -m 644 $(FLEXLIB) $(DESTDIR)$(LIBDIR)/libfl.a
  322. X    $(RANLIB) $(DESTDIR)$(LIBDIR)/libfl.a
  323. X
  324. X$(DESTDIR)$(LIBDIR):
  325. X    mkdir $@
  326. X
  327. Xinstall.man: flex.1 flexdoc.1
  328. X    install -c -m 644 flex.1 $(DESTDIR)$(MANDIR)/flex.$(MANEXT)
  329. X    install -c -m 644 flexdoc.1 $(DESTDIR)$(MANDIR)/flexdoc.$(MANEXT)
  330. X
  331. Xinstall.cat: flex.1 flexdoc.1
  332. X    nroff -h -man flex.1 > $(DESTDIR)$(MANDIR)/flex.$(MANEXT)
  333. X    nroff -h -man flexdoc.1 > $(DESTDIR)$(MANDIR)/flexdoc.$(MANEXT)
  334. X    chmod 644 $(DESTDIR)$(MANDIR)/flex.$(MANEXT)
  335. X    chmod 644 $(DESTDIR)$(MANDIR)/flexdoc.$(MANEXT)
  336. X
  337. Xclean :
  338. X    rm -f core errs flex *.o parse.c *.lint parse.h flex.man tags \
  339. X        $(FLEXLIB)
  340. X
  341. Xtags :
  342. X    ctags $(FLEX_C_SOURCES)
  343. X
  344. Xvms :    flex.man
  345. X    $(MAKE) $(MFLAGS) distrib
  346. X
  347. Xtest : flex
  348. X    ./flex $(FLEX_FLAGS) $(COMPRESSION) scan.l | diff scan.c -
  349. X
  350. Xbigtest :
  351. X    rm -f scan.c ; $(MAKE) COMPRESSION="-C" test
  352. X    rm -f scan.c ; $(MAKE) COMPRESSION="-Ce" test
  353. X    rm -f scan.c ; $(MAKE) COMPRESSION="-Cm" test
  354. X    rm -f scan.c ; $(MAKE) COMPRESSION="-Cfe" test
  355. X    rm -f scan.c ; $(MAKE) COMPRESSION="-CFe" test
  356. X    rm -f scan.c ; $(MAKE) COMPRESSION="-Cf" test
  357. X    rm -f scan.c ; $(MAKE) COMPRESSION="-CF" test
  358. X    rm -f scan.c ; $(MAKE)
  359. END_OF_FILE
  360.   if test 4876 -ne `wc -c <'Makefile'`; then
  361.     echo shar: \"'Makefile'\" unpacked with wrong size!
  362.   fi
  363.   # end of 'Makefile'
  364. fi
  365. if test -f 'ccl.c' -a "${1}" != "-c" ; then 
  366.   echo shar: Will not clobber existing file \"'ccl.c'\"
  367. else
  368.   echo shar: Extracting \"'ccl.c'\" \(4115 characters\)
  369.   sed "s/^X//" >'ccl.c' <<'END_OF_FILE'
  370. X/* ccl - routines for character classes */
  371. X
  372. X/*-
  373. X * Copyright (c) 1990 The Regents of the University of California.
  374. X * All rights reserved.
  375. X *
  376. X * This code is derived from software contributed to Berkeley by
  377. X * Vern Paxson.
  378. X * 
  379. X * The United States Government has rights in this work pursuant
  380. X * to contract no. DE-AC03-76SF00098 between the United States
  381. X * Department of Energy and the University of California.
  382. X *
  383. X * Redistribution and use in source and binary forms are permitted provided
  384. X * that: (1) source distributions retain this entire copyright notice and
  385. X * comment, and (2) distributions including binaries display the following
  386. X * acknowledgement:  ``This product includes software developed by the
  387. X * University of California, Berkeley and its contributors'' in the
  388. X * documentation or other materials provided with the distribution and in
  389. X * all advertising materials mentioning features or use of this software.
  390. X * Neither the name of the University nor the names of its contributors may
  391. X * be used to endorse or promote products derived from this software without
  392. X * specific prior written permission.
  393. X * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
  394. X * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  395. X * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  396. X */
  397. X
  398. X#ifndef lint
  399. Xstatic char rcsid[] =
  400. X    "@(#) $Header: /usr/fsys/odin/a/vern/flex/RCS/ccl.c,v 2.5 90/06/27 23:48:13 vern Exp $ (LBL)";
  401. X#endif
  402. X
  403. X#include "flexdef.h"
  404. X
  405. X/* ccladd - add a single character to a ccl
  406. X *
  407. X * synopsis
  408. X *    int cclp;
  409. X *    int ch;
  410. X *    ccladd( cclp, ch );
  411. X */
  412. X
  413. Xvoid ccladd( cclp, ch )
  414. Xint cclp;
  415. Xint ch;
  416. X
  417. X    {
  418. X    int ind, len, newpos, i;
  419. X
  420. X    len = ccllen[cclp];
  421. X    ind = cclmap[cclp];
  422. X
  423. X    /* check to see if the character is already in the ccl */
  424. X
  425. X    for ( i = 0; i < len; ++i )
  426. X    if ( ccltbl[ind + i] == ch )
  427. X        return;
  428. X
  429. X    newpos = ind + len;
  430. X
  431. X    if ( newpos >= current_max_ccl_tbl_size )
  432. X    {
  433. X    current_max_ccl_tbl_size += MAX_CCL_TBL_SIZE_INCREMENT;
  434. X
  435. X    ++num_reallocs;
  436. X
  437. X    ccltbl = reallocate_character_array( ccltbl, current_max_ccl_tbl_size );
  438. X    }
  439. X
  440. X    ccllen[cclp] = len + 1;
  441. X    ccltbl[newpos] = ch;
  442. X    }
  443. X
  444. X
  445. X/* cclinit - make an empty ccl
  446. X *
  447. X * synopsis
  448. X *    int cclinit();
  449. X *    new_ccl = cclinit();
  450. X */
  451. X
  452. Xint cclinit()
  453. X
  454. X    {
  455. X    if ( ++lastccl >= current_maxccls )
  456. X    {
  457. X    current_maxccls += MAX_CCLS_INCREMENT;
  458. X
  459. X    ++num_reallocs;
  460. X
  461. X    cclmap = reallocate_integer_array( cclmap, current_maxccls );
  462. X    ccllen = reallocate_integer_array( ccllen, current_maxccls );
  463. X    cclng = reallocate_integer_array( cclng, current_maxccls );
  464. X    }
  465. X
  466. X    if ( lastccl == 1 )
  467. X    /* we're making the first ccl */
  468. X    cclmap[lastccl] = 0;
  469. X
  470. X    else
  471. X    /* the new pointer is just past the end of the last ccl.  Since
  472. X     * the cclmap points to the \first/ character of a ccl, adding the
  473. X     * length of the ccl to the cclmap pointer will produce a cursor
  474. X     * to the first free space
  475. X     */
  476. X    cclmap[lastccl] = cclmap[lastccl - 1] + ccllen[lastccl - 1];
  477. X
  478. X    ccllen[lastccl] = 0;
  479. X    cclng[lastccl] = 0;    /* ccl's start out life un-negated */
  480. X
  481. X    return ( lastccl );
  482. X    }
  483. X
  484. X
  485. X/* cclnegate - negate a ccl
  486. X *
  487. X * synopsis
  488. X *    int cclp;
  489. X *    cclnegate( ccl );
  490. X */
  491. X
  492. Xvoid cclnegate( cclp )
  493. Xint cclp;
  494. X
  495. X    {
  496. X    cclng[cclp] = 1;
  497. X    }
  498. X
  499. X
  500. X/* list_character_set - list the members of a set of characters in CCL form
  501. X *
  502. X * synopsis
  503. X *     int cset[CSIZE];
  504. X *     FILE *file;
  505. X *     list_character_set( cset );
  506. X *
  507. X * writes to the given file a character-class representation of those
  508. X * characters present in the given set.  A character is present if it
  509. X * has a non-zero value in the set array.
  510. X */
  511. X
  512. Xvoid list_character_set( file, cset )
  513. XFILE *file;
  514. Xint cset[];
  515. X
  516. X    {
  517. X    register int i;
  518. X    char *readable_form();
  519. X
  520. X    putc( '[', file );
  521. X
  522. X    for ( i = 0; i < csize; ++i )
  523. X    {
  524. X    if ( cset[i] )
  525. X        {
  526. X        register int start_char = i;
  527. X
  528. X        putc( ' ', file );
  529. X
  530. X        fputs( readable_form( i ), file );
  531. X
  532. X        while ( ++i < csize && cset[i] )
  533. X        ;
  534. X
  535. X        if ( i - 1 > start_char )
  536. X        /* this was a run */
  537. X        fprintf( file, "-%s", readable_form( i - 1 ) );
  538. X
  539. X        putc( ' ', file );
  540. X        }
  541. X    }
  542. X
  543. X    putc( ']', file );
  544. X    }
  545. END_OF_FILE
  546.   if test 4115 -ne `wc -c <'ccl.c'`; then
  547.     echo shar: \"'ccl.c'\" unpacked with wrong size!
  548.   fi
  549.   # end of 'ccl.c'
  550. fi
  551. echo shar: End of archive 10 \(of 10\).
  552. cp /dev/null ark10isdone
  553. MISSING=""
  554. for I in 1 2 3 4 5 6 7 8 9 10 ; do
  555.     if test ! -f ark${I}isdone ; then
  556.     MISSING="${MISSING} ${I}"
  557.     fi
  558. done
  559. if test "${MISSING}" = "" ; then
  560.     echo You have unpacked all 10 archives.
  561.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  562. else
  563.     echo You still must unpack the following archives:
  564.     echo "        " ${MISSING}
  565. fi
  566. exit 0
  567. exit 0 # Just in case...
  568.